<%@ include file="../taglibs.jsp" %>	
<script src='<c:url value="/plantilla/js/responsiveslides.js"/>'></script>
<script>
	$(function () {
	  $("#slider").responsiveSlides({
		auto: true,
		pager: false,
		nav: true,
		speed: 500,
		maxwidth: 960,
		namespace: "centered-btns"
	  });
	});
</script>
<sec:authorize access="hasRole('ROLE_USER')">
	<!-- For login user -->
	<c:url value="/j_spring_security_logout" var="logoutUrl" />
	<form action="${logoutUrl}" method="post" id="logoutForm">
		<input type="hidden" name="${_csrf.parameterName}"
			value="${_csrf.token}" />
	</form>
	<script>
		function formSubmit() {
			document.getElementById("logoutForm").submit();
		}
	</script>

</sec:authorize>
					
			<header>
				<div class="wrapper row">
				<h1><a href='<c:url value="${baseURL}/inicio?forzado"/>' id="logo"><img src='<c:url value="/plantilla/images/logo.png"/>' /></a></h1>
				<nav>
					<ul id="menu">
						<c:if test="${menu[0] != null}">
							<spring:url var="url0" value="${menu[0].vinculo}" />
							<c:if test="${menu[0].activa!='active'}">
								<li id="nav1" style='width:76px;' class=""><a Style='background:${menu[0].imagedes} bottom center no-repeat' onmouseover="this.style.backgroundImage='${menu[0].imageact}';" onmouseout="this.style.backgroundImage='${menu[0].imagedes}';"href="${url0}">${menu[0].texto1}<span>${menu[0].texto2}</span></a></li>
							</c:if>
							<c:if test="${menu[0].activa=='active'}">
								<li id="nav1" style='width:76px;' class="${menu[0].activa}"><a Style='background:${menu[0].imageact} bottom center no-repeat' onmouseover="this.style.backgroundImage='${menu[0].imageact}';" onmouseout="this.style.backgroundImage='${menu[0].imageact}';"href="#">${menu[0].texto1}<span>${menu[0].texto2}</span></a></li>
							</c:if>
						</c:if>							
						<c:if test="${menu[1] != null}">						
							<spring:url var="url1" value="${menu[1].vinculo}" />
							<c:if test="${menu[1].activa!='active'}">
								<li id="nav2" style='width:76px;' class="${menu[1].activa}"><a Style='background:${menu[1].imagedes} bottom center no-repeat' onmouseover="this.style.backgroundImage='${menu[1].imageact}';" onmouseout="this.style.backgroundImage='${menu[1].imagedes}';"href="${url1}">${menu[1].texto1}<span>${menu[1].texto2}</span></a>
							</c:if>
							<c:if test="${menu[1].activa=='active'}">
								<li id="nav1" style='width:76px;' class="${menu[1].activa}"><a Style='background:${menu[1].imageact} bottom center no-repeat' onmouseover="this.style.backgroundImage='${menu[1].imageact}';" onmouseout="this.style.backgroundImage='${menu[1].imageact}';"href="#">${menu[1].texto1}<span>${menu[1].texto2}</span></a></li>
							</c:if>
						</c:if>
						<c:if test="${menu[2] != null}">
							<c:if test="${menu[2].activa!='active'}">
								<spring:url var="url2" value="${menu[2].vinculo}" />
								<li id="nav3" style='width:76px;' class="${menu[2].activa}"><a Style='background:${menu[2].imagedes} bottom center no-repeat' onmouseover="this.style.backgroundImage='${menu[2].imageact}';" onmouseout="this.style.backgroundImage='${menu[2].imagedes}';"href="${url2}">${menu[2].texto1}<span>${menu[2].texto2}</span></a></li>
							</c:if>
							<c:if test="${menu[2].activa=='active'}">
								<li id="nav1" style='width:76px;' class="${menu[2].activa}"><a Style='background:${menu[2].imageact} bottom center no-repeat' onmouseover="this.style.backgroundImage='${menu[2].imageact}';" onmouseout="this.style.backgroundImage='${menu[2].imageact}';"href="#">${menu[2].texto1}<span>${menu[2].texto2}</span></a></li>
							</c:if>
						</c:if>
						<c:if test="${menu[3] != null}">
							<c:if test="${menu[3].activa!='active'}">
								<spring:url var="url3" value="${menu[3].vinculo}" />
								<li id="nav4" style='width:76px;' class="${menu[3].activa}"><a Style='background:${menu[3].imagedes} bottom center no-repeat' onmouseover="this.style.backgroundImage='${menu[3].imageact}';" onmouseout="this.style.backgroundImage='${menu[3].imagedes}';"href="${url3}">${menu[3].texto1}<span>${menu[3].texto2}</span></a></li>
							</c:if>
							<c:if test="${menu[3].activa=='active'}">
								<li id="nav1" style='width:76px;' class="${menu[3].activa}"><a Style='background:${menu[3].imageact} bottom center no-repeat' onmouseover="this.style.backgroundImage='${menu[3].imageact}';" onmouseout="this.style.backgroundImage='${menu[3].imageact}';"href="#">${menu[3].texto1}<span>${menu[3].texto2}</span></a></li>
							</c:if>								
						</c:if>
						<c:if test="${pageContext.request.userPrincipal.name == null}">
							<c:if test="${menu[4] != null}">
								<c:if test="${menu[4].activa!='active'}">
									<spring:url var="url4" value="${menu[4].vinculo}" />
									<li id="nav5"  style='{"${menu[4].imagedes}"}}:hover {"${menu[4].imageact}"};width:76px;' class="${menu[4].activa}"><a href="${url4}">${menu[4].texto1}<span>${menu[4].texto2}</span></a></li>
								</c:if>
								<c:if test="${menu[4].activa=='active'}">
									<spring:url var="url4" value="${menu[4].vinculo}" />
									<li id="nav1" style='width:76px;' class="${menu[4].activa}"><a Style='background:${menu[4].imageact} bottom center no-repeat' onmouseover="this.style.backgroundImage='${menu[4].imageact}';" onmouseout="this.style.backgroundImage='${menu[4].imageact}';"href="#">${menu[4].texto1}<span>${menu[4].texto2}</span></a></li>
								</c:if>
							</c:if>								
						</c:if>
						<c:if test="${pageContext.request.userPrincipal.name != null}">
							<c:if test="${menu[4] != null}">
								<c:if test="${menu[4].activa!='active'}">
									<spring:url var="url4" value="${menu[4].vinculo}" />
									<li id="nav5" style='width:76px;' class="${menu[4].activa}"><a Style='background:${menu[4].imagedes} bottom center no-repeat' onmouseover="this.style.backgroundImage='${menu[4].imageact}';" onmouseout="this.style.backgroundImage='${menu[4].imagedes}';"href="${url4}">${menu[4].username}<span>${menu[4].texto2}</span></a></li>
								</c:if>
								<c:if test="${menu[4].activa=='active'}">
									<spring:url var="url4" value="${menu[4].vinculo}" />
									<li id="nav1" style='width:76px;' class="${menu[4].activa}"><a Style='background:${menu[4].imageact} bottom center no-repeat' onmouseover="this.style.backgroundImage='${menu[4].imageact}';" onmouseout="this.style.backgroundImage='${menu[4].imageact}';" id="salir" href="${url4}">${menu[4].username}<span>${menu[4].texto2}</span></a></li>
								</c:if>
							</c:if>							
						</c:if>
						<c:if test="${pageContext.request.userPrincipal.name != null}">
							<c:if test="${menu[5] != null}">
								<c:if test="${menu[5].activa!='active'}">
									<spring:url var="url5" value="${menu[5].vinculo}" />
									<li id="nav5" style='width:76px;' class="${menu[5].activa}"><a Style='background:${menu[5].imagedes} bottom center no-repeat' onmouseover="this.style.backgroundImage='${menu[5].imageact}';" onmouseout="this.style.backgroundImage='${menu[5].imagedes}';" id="salir" href="${url5}">${menu[5].username}<span>${menu[5].texto2}</span></a></li>
								</c:if>
								<c:if test="${menu[5].activa=='active'}">
									<spring:url var="url5" value="${menu[4].vinculo}" />
									<li id="nav1" style='width:76px;' class="${menu[5].activa}"><a Style='background:${menu[5].imageact} bottom center no-repeat' onmouseover="this.style.backgroundImage='${menu[5].imageact}';" onmouseout="this.style.backgroundImage='${menu[5].imageact}';" id="salir" href="${url5}">${menu[5].username}<span>${menu[5].texto2}</span></a></li>
								</c:if>
							</c:if>							
						</c:if>
						<!-- 
						<li id="nav1" style="width: 76px;" >
							<div class="idioma"  style="padding-left: 27px;display:block;width: 20px;margin-top: 10px;">
								<a href="?language=es" style="background: none;height: 20px;"><span>Esp</span></a>
								<a href="?language=eu" style="background: none;height: 20px;"><span>Eus</span></a>
								<a href="?language=en" style="background: none;height: 20px;"><span>Eng</span></a>
							</div>
						</li>
						--> 										
					</ul>
				</nav>
				</div>
				<!-- 
				<div class="wrapper row">
					<ul id="menu" Style="float: left;">
						<li id="nav1" style="width: 16px;" ><a Style="background:none" href="#"><span>ESP</span></span></a></li>
					</ul>
				</div>					
				 -->
			
				<!-- <a href="#">ESP</a>&nbsp;<a href="#">EUS</a>&nbsp;<a href="#">ENG</a></div> -->
				<div class="wrapper row">
					<div class="slider">
					  	<div class="rslides_container">
							<ul class="rslides" id="slider">
								<li><img src='<c:url value="/plantilla/images/img1.jpg"/>' alt=""></li>
								<li><img src='<c:url value="/plantilla/images/img2.jpg"/>' alt=""></li>
								<li><img src='<c:url value="/plantilla/images/img3.jpg"/>' alt=""></li>
								<li><img src='<c:url value="/plantilla/images/img4.jpg"/>' alt=""></li>
								<li><img src='<c:url value="/plantilla/images/img5.jpg"/>' alt=""></li>
								<li><img src='<c:url value="/plantilla/images/img6.jpg"/>' alt=""></li>
								<li><img src='<c:url value="/plantilla/images/img7.jpg"/>' alt=""></li>
							</ul>
						</div>
					</div>
				</div>
				
			</header>